package languageacquisition.ontology;

import jade.content.Concept;

public class Property implements Concept, Comparable<Property> {
	
	private static final long serialVersionUID = -2585551728459750406L;
	int id;

	public Property() {
		id = -1;
	}

	public Property(int i) {
		id = i;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int compareTo(Property p) {
		if (this == p)
			return 0;
		if (p.id != this.id)
			return this.id - p.id;
		else
			return 0;

	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Property other = (Property) obj;
		if (id != other.id)
			return false;
		return true;
	}

	public String toString() {
		return Integer.toString(id);
	}

}
